//
//  MyTabBarController.h
//  CustomTabbar
//
//  Created by simon on 10-9-15.
//  Copyright 2010 simonwang142232@gmail.com. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MyViewController.h"
@class MyTabBar;
@class DefaultViewController;

@interface MyTabBarController : UIViewController {
	MyTabBar* tabBar;
	
	NSArray* viewControllers;
	DefaultViewController* defaultController;
	
	NSMutableArray* contentViews;
}

@property(nonatomic,readonly) MyTabBar* tabBar;
@property(nonatomic,retain) NSArray* viewControllers;
@property(nonatomic,retain) DefaultViewController* defaultController;

-(void) setContentView:(UIView*)contentView;

//选中某个控制器的某个segmentControl
-(void) selectControllerAtIndex:(int)index;

@end

//本控制器控制的视图的位置和大小
#define viewX 0
#define viewY 0
#define viewWidth 320
#define viewHeight 480

//tabBar的位置和大小
#define tabBarX 0
#define tabBarY 390
#define tabBarWidth 320
#define tabBarHeight 90

#define tabBarLeftMargin 10
#define tabBarRightMargin 10
#define tabBarTopMargin 5
#define tabBarBottomMargin 5
#define tabBarItemSpacing 0

#define tabBarImageRatio 0.8
#define tabBarTitleFont [UIFont boldSystemFontOfSize:12.5]

//contentView
#define contentViewX 0
#define contentViewY 0
#define contentViewWidth 320
#define contentViewHeight (480-tabBarHeight)
